feat(paywalls): add web_view message model and parsing (PWENG-98)#3654
Closed
alexrepty wants to merge 1 commit into
Closed
feat(paywalls): add web_view message model and parsing (PWENG-98)#3654alexrepty wants to merge 1 commit into
alexrepty wants to merge 1 commit into
Conversation
This was referenced Jun 25, 2026
Contributor
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
2 tasks
This was referenced Jun 25, 2026
alexrepty
changed the base branch from
alexrepty/paywalls-web-view-csp
to
graphite-base/3654
June 26, 2026 10:49
alexrepty
force-pushed
the
alexrepty/paywalls-web-view-message-model
branch
from
June 26, 2026 10:49
21899a1 to
8558b7d
Compare
alexrepty
force-pushed
the
graphite-base/3654
branch
from
June 26, 2026 10:49
66c0ccb to
3e62e49
Compare
alexrepty
changed the base branch from
graphite-base/3654
to
alexrepty/paywalls-web-view-value-types
June 26, 2026 10:49
This was referenced Jun 26, 2026
alexrepty
force-pushed
the
alexrepty/paywalls-web-view-message-model
branch
from
June 26, 2026 14:20
8558b7d to
2790f47
Compare
alexrepty
force-pushed
the
alexrepty/paywalls-web-view-value-types
branch
2 times, most recently
from
June 26, 2026 14:26
2716386 to
27793a8
Compare
alexrepty
force-pushed
the
alexrepty/paywalls-web-view-message-model
branch
4 times, most recently
from
June 29, 2026 09:58
b70692b to
c8ba63e
Compare
alexrepty
force-pushed
the
alexrepty/paywalls-web-view-message-model
branch
from
June 29, 2026 13:58
c8ba63e to
5525f6c
Compare
alexrepty
force-pushed
the
alexrepty/paywalls-web-view-value-types
branch
from
June 29, 2026 13:58
27793a8 to
81453b8
Compare
alexrepty
force-pushed
the
alexrepty/paywalls-web-view-message-model
branch
from
June 29, 2026 14:14
5525f6c to
d7f8fa1
Compare
alexrepty
force-pushed
the
alexrepty/paywalls-web-view-value-types
branch
from
June 29, 2026 14:14
81453b8 to
5505947
Compare
alexrepty
marked this pull request as ready for review
June 29, 2026 14:42
alexrepty
force-pushed
the
alexrepty/paywalls-web-view-message-model
branch
from
June 30, 2026 07:44
d7f8fa1 to
86b7b79
Compare
alexrepty
force-pushed
the
alexrepty/paywalls-web-view-value-types
branch
from
June 30, 2026 07:44
5505947 to
74610d7
Compare
alexrepty
force-pushed
the
alexrepty/paywalls-web-view-value-types
branch
from
June 30, 2026 08:43
74610d7 to
a42c874
Compare
alexrepty
force-pushed
the
alexrepty/paywalls-web-view-message-model
branch
from
June 30, 2026 08:43
86b7b79 to
cdc1156
Compare
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit cdc1156. Configure here.
AlvaroBrey
force-pushed
the
alexrepty/paywalls-web-view-message-model
branch
from
July 6, 2026 08:12
cdc1156 to
7c75281
Compare
AlvaroBrey
force-pushed
the
alexrepty/paywalls-web-view-value-types
branch
from
July 6, 2026 08:12
a42c874 to
7aceb78
Compare
AlvaroBrey
force-pushed
the
alexrepty/paywalls-web-view-value-types
branch
from
July 6, 2026 13:57
7aceb78 to
cf8d3d0
Compare
AlvaroBrey
force-pushed
the
alexrepty/paywalls-web-view-message-model
branch
from
July 6, 2026 13:57
7c75281 to
a1cc787
Compare
AlvaroBrey
marked this pull request as draft
July 6, 2026 14:42
AlvaroBrey
force-pushed
the
alexrepty/paywalls-web-view-message-model
branch
from
July 7, 2026 13:22
a1cc787 to
f8d54ec
Compare
AlvaroBrey
force-pushed
the
alexrepty/paywalls-web-view-value-types
branch
from
July 7, 2026 13:22
cf8d3d0 to
9cad6e3
Compare
JZDesign
force-pushed
the
alexrepty/paywalls-web-view-message-model
branch
from
July 10, 2026 16:40
f8d54ec to
77a5162
Compare
JZDesign
force-pushed
the
alexrepty/paywalls-web-view-value-types
branch
from
July 10, 2026 16:40
9cad6e3 to
0923d25
Compare
Adds a bidirectional JS<->native bridge for the Paywalls V2 `web_view` component: a document-start `window.RevenueCatWebView` shim, message parsing/validation (`WebViewMessageParser`, `WebViewMessageType`), the public `PaywallWebViewMessage` / `PaywallWebViewValue` / `PaywallWebViewMessageHandler` / `PaywallWebViewController` surface, and an SDK-managed variables provider (locale, color scheme, custom variables). Apps opt in via `PaywallOptions.setWebViewMessageHandler(...)`, threaded through `PaywallState` / `OfferingToStateMapper`. Regenerates ui/revenuecatui/api.txt for the new public API. Recommended labels: pr:feat, pr:RevenueCatUI, feat:Paywalls_V2
JZDesign
force-pushed
the
alexrepty/paywalls-web-view-message-model
branch
from
July 10, 2026 18:31
77a5162 to
9e59a49
Compare
JZDesign
force-pushed
the
alexrepty/paywalls-web-view-value-types
branch
from
July 10, 2026 18:31
0923d25 to
2a218da
Compare
📸 Snapshot Test1 modified, 620 unchanged
🛸 Powered by Emerge Tools |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Checklist
purchases-iosand hybridsMotivation
Defines the inbound message model and parsing for
web_view↔ native communication, so messages from web content are validated before reaching app code.Part of PWENG-98.
Description
PaywallWebViewMessageplus thePaywallWebViewMessageHandler/PaywallWebViewControllersurface.WebViewMessageTypeandWebViewMessageParser: validates the flat envelope, enforces payload size / nesting-depth caps, requires thecomponent_idto match the rendered component, and validates per-type fields (rc:step-loaded,rc:step-complete,rc:request-variables,rc:error); unknown types are dropped.WebViewbridge yet.WebViewMessageParserTest.iOS parity: mirrors
purchases-ios(web-view-bridge-wiring).Stack (merge bottom-up): schema → rendering → CSP → value types → message model → variables provider → JS bridge → wiring.
Note
Low Risk
Additive public API and internal validation logic with no runtime WebView integration or purchase flow changes in this PR.
Overview
Introduces the public surface for Paywalls V2
web_view↔ native messaging:PaywallWebViewMessage,PaywallWebViewMessageHandler, andPaywallWebViewController(reply viapostVariables/postMessageusingPaywallWebViewValue). App code will wire the handler throughPaywallOptions.Builder.setWebViewMessageHandlerin a follow-up; the SDK does not auto-dismiss or purchase onrc:step-complete.Adds internal parsing via
WebViewMessageParser: validates the flat postMessage envelope, caps payload size (64KB) and nesting depth, requirescomponent_idto match the rendered web view, handlesrc:step-loaded,rc:step-complete,rc:request-variables, andrc:error, and drops unknown types and invalid payloads.api.txtis updated for the new types.No live WebView bridge in this PR—data and validation only, covered by
WebViewMessageParserTest.Reviewed by Cursor Bugbot for commit a1cc787. Bugbot is set up for automated code reviews on this repo. Configure here.